<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="copyright" content="www.apicloud.com" />
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>推荐</title>
<link rel="stylesheet" type="text/css" href="../../css/api.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<style>
	html {height: 100%;}
	body {height: 100%;background: #f0f0f0;}
	.login_box {
		height: 100%;
		width: 100%;
		display: table;
	}
	.login {
		width: 100%;
		height: 100%;
		display: table-cell;
		vertical-align: middle;
		text-align: center;
	}
	.login_body {
		width: 90%;
		margin: 0 auto;
		padding: 1rem;
		background-color: #fff;
		border-radius: 0.5rem;
		-moz-box-shadow:0px 0.3rem 0.4rem rgba(0,0,0,0.1);
		-webkit-box-shadow:0px 0.3rem 0.4rem rgba(0,0,0,0.1);
		box-shadow:0px 0.3rem 0.4rem rgba(0,0,0,0.1);
		margin-bottom: 1.5rem;
	}
	.input {
		margin-bottom: 1rem;
		position: relative;
	}
	.input .input_img {
		position: absolute;
		width: 2rem;
		height: 2rem;
		top: 0;
		left: 0;
		display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
	}
	.input_img img {
		width: 0.8rem;
	}
	.login_but {
		background-color: #2997e4;
		font-size: 0.8rem;
		color: #fff;
		padding: 0.5rem 0;
		text-align: center;
		border-radius: 4px;
	}


	.login_footer {
		width: 80%;
		margin: 0 auto;
	}
	.login_footer h5 {
		color: #999;
		font-size: 0.7rem;
		margin-bottom: 2rem;
	}
  .input_txt {
    font-size: 0.8rem;
    width: 5rem;
    text-align: center;
    height: 2rem;
    line-height: 2rem;
    position: absolute;
    right: 0;
    top: 0;
    color: #2997e4;
  }

	.input input {height: 2rem;border-radius: 0.2rem;box-sizing: border-box;padding-right: 0.5rem;padding-left: 2rem;font-size: 0.8rem;background-color: #f5f5f5;color: #8E8C8C;width: 100%;}
	.input input::-webkit-input-placeholder {color: #ccc;}
	.input input {outline: none;}

  .yzm input {
    padding-right: 5rem;
  }
</style>
</head>
<body>

	<div class="login_box" id="app" v-cloak>
		<div class="login">
			<div class="login_body">
				<div class="input">
					<div class="input_img">
						<img src="../../image/zhanghao@3x.png" alt="">
					</div>

					<input type="text" placeholder="请输入手机号码" v-model="account">
				</div>
				<div class="input yzm">
					<div class="input_img">
						<img src="../../image/yanzhengma@3x.png" alt="">
					</div>
					<div class="input_txt" v-if="getCodeTime == 60" @click="getCode()">获取验证码</div>
          <div class="input_txt" style="color: #999" v-else>{{getCodeTime}}s后重试</div>

					<input type="text" placeholder="请输入验证码" v-model="code">
				</div>
  				<div class="input">
  					<div class="input_img">
  						<img src="../../image/mima@3x.png" alt="">
  					</div>

  					<input type="password" placeholder="请输入六位字符以上密码" v-model="password">
  				</div>

				<div class="login_but" @click="Register()">
			    注册
			  </div>
			</div>
			<div class="login_footer">
				<h5 tapmode="presshover" onclick="Openindex()">随便看看</h5>
			</div>
		</div>
	</div>

</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="data:application/octet-stream;base64,LyogWmVwdG8gdjEuMS40IC0gemVwdG8gZXZlbnQgYWpheCBmb3JtIGllIC0gemVwdG9qcy5jb20vbGljZW5zZSAqLw0KdmFyIFplcHRvPWZ1bmN0aW9uKCl7ZnVuY3Rpb24gTCh0KXtyZXR1cm4gbnVsbD09dD9TdHJpbmcodCk6altTLmNhbGwodCldfHwib2JqZWN0In1mdW5jdGlvbiBaKHQpe3JldHVybiJmdW5jdGlvbiI9PUwodCl9ZnVuY3Rpb24gJCh0KXtyZXR1cm4gbnVsbCE9dCYmdD09dC53aW5kb3d9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ChlLm5hbWUpKyI9IitlbmNvZGVVUklDb21wb25lbnQoZS52YWx1ZSkpfSksdC5qb2luKCImIil9LHQuZm4uc3VibWl0PWZ1bmN0aW9uKGUpe2lmKGUpdGhpcy5iaW5kKCJzdWJtaXQiLGUpO2Vsc2UgaWYodGhpcy5sZW5ndGgpe3ZhciBuPXQuRXZlbnQoInN1Ym1pdCIpO3RoaXMuZXEoMCkudHJpZ2dlcihuKSxuLmlzRGVmYXVsdFByZXZlbnRlZCgpfHx0aGlzLmdldCgwKS5zdWJtaXQoKX1yZXR1cm4gdGhpc319KFplcHRvKSxmdW5jdGlvbih0KXsiX19wcm90b19fImlue318fHQuZXh0ZW5kKHQuemVwdG8se1o6ZnVuY3Rpb24oZSxuKXtyZXR1cm4gZT1lfHxbXSx0LmV4dGVuZChlLHQuZm4pLGUuc2VsZWN0b3I9bnx8IiIsZS5fX1o9ITAsZX0saXNaOmZ1bmN0aW9uKGUpe3JldHVybiJhcnJheSI9PT10LnR5cGUoZSkmJiJfX1oiaW4gZX19KTt0cnl7Z2V0Q29tcHV0ZWRTdHlsZSh2b2lkIDApfWNhdGNoKGUpe3ZhciBuPWdldENvbXB1dGVkU3R5bGU7d2luZG93LmdldENvbXB1dGVkU3R5bGU9ZnVuY3Rpb24odCl7dHJ5e3JldHVybiBuKHQpfWNhdGNoKGUpe3JldHVybiBudWxsfX19fShaZXB0byk7"></script>
<script type="text/javascript">
apiready = function() {
	var URL = 'http://kexiecs.unohacha.com/kexieScore';

	var app = new Vue({
		el: '#app',
		data: {
			account: [],
			password: [],
			code: [],
			getCodeTime: 60
		},
		created: function() {
			var $_this = this;

		},
		methods: {
			getCode: function () {
				var $_this = this;
				if($_this.account == '' || !/^[1][3,4,5,7,8][0-9]{9}$/.test($_this.account)) {
		 						 api.toast({ msg: '请输入正确的手机号码',duration: 2000,location:'middle' });
					return
				}
				api.ajax({
				 	url: URL + '/user/requestPIN',
			    method: 'post',
			    headers: {
			        'Content-Type': 'application/json'
			    },
			    data: {
			        body: {
	 						 mobile: $_this.account,
	 						 pinflag: 1 // 注册
			        }
			    }
			}, function(ret, err) {
			    if (ret) {
			        // api.alert({ msg: JSON.stringify(ret) });
							var timer = setInterval(function () {
								$_this.getCodeTime = $_this.getCodeTime - 1
								if ($_this.getCodeTime <= 0) {
									$_this.getCodeTime = 60
									clearInterval(timer)
								}
							}, 1000)
							api.alert({ msg: ret.message})
			    } else {
			        api.alert({ msg: JSON.stringify(err) });
			    }
			});
			},
			 Register: function() {
				 var $_this = this;
				 if($_this.account == '' || !/^[1][3,4,5,7,8][0-9]{9}$/.test($_this.account)) {
					 api.toast({ msg: '请输入正确的手机号码',duration: 2000,location:'middle' });
					 return
				 } else if($_this.code == '' || !/^[0-9]{4}$/.test($_this.code)) {
					 api.toast({ msg: '验证码错误',duration: 2000,location:'middle' });
					 return
				 } else if($_this.password == '') {
					 api.toast({ msg: '请输入密码',duration: 2000,location:'middle' });
					 return
				 }
				 api.ajax({
					url: URL + '/user/register',
					method: 'post',
			    headers: {
			        'Content-Type': 'application/json'
			    },
			    data: {
			        body: {
								mobile: $_this.account,
 		 						pin: $_this.code,
 		 						password: $_this.password
			        }
			    }
				}, function(ret, err) {
						if (ret) {
								// api.alert({ msg: JSON.stringify(ret) });
								if(ret.code == 0) {
									api.toast({ msg: '注册成功',duration: 2000,location:'middle' });
									openLogin()
								} else {
									api.alert({ msg: ret.message})
								}
							// 	$_this.newsList = ret.data.newsList
						} else {
								api.alert({ msg: JSON.stringify(err) });
						}
				})
			}
		}
	})
}
	function Openindex() {
		api.openWin({
			name: 'index',
			pageParam: {name: 'index'},
			url: '../../index.html',
			delay: 200,
			bounces: false
		});
	}
	function openLogin()
	{
		api.openWin({
			name: 'login',
			url: './login_header.html',
			bounces: false,
			delay:200
		});
	}

</script>
</html>
